cars = ['subaru', 'audi', 'toyota', 'bmw']

cars.reverse()

print(f'反向排序：{cars}')

cars.sort()

print(f'按字母正向排序：{cars}')

cars.sort(reverse=True)

print(f'按字母反向排序：{cars}')

new_cars = cars[1:3]  # 等价于 cars[:3]

print(new_cars)

for car in cars[:3]:
    print(car)
